<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SC2API: sc2::Unit Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="SC2-Logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SC2API
   </div>
   <div id="projectbrief">An API for AI for StarCraft II</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>sc2</b></li><li class="navelem"><a class="el" href="classsc2_1_1_unit.html">Unit</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="classsc2_1_1_unit-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">sc2::Unit Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A unit. Could be a structure, a worker or a military unit.  
 <a href="classsc2_1_1_unit.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="sc2__unit_8h_source.html">sc2_unit.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:af7815dad89107a05298c245b702ab270"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#af7815dad89107a05298c245b702ab270">DisplayType</a> { <a class="el" href="classsc2_1_1_unit.html#af7815dad89107a05298c245b702ab270abd326f19234975ca23bb3265223d969d">Visible</a> = 1, 
<a class="el" href="classsc2_1_1_unit.html#af7815dad89107a05298c245b702ab270a0e970750301873d6ee4903e9bcb8d2c6">Snapshot</a> = 2, 
<a class="el" href="classsc2_1_1_unit.html#af7815dad89107a05298c245b702ab270a688e1743ab48c61d2e77ac6212f77cd9">Hidden</a> = 3
 }<tr class="memdesc:af7815dad89107a05298c245b702ab270"><td class="mdescLeft">&#160;</td><td class="mdescRight">If the unit is shown on screen or not.  <a href="classsc2_1_1_unit.html#af7815dad89107a05298c245b702ab270">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:af7815dad89107a05298c245b702ab270"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a40e672e7599d73ef8ef5758bbd7461"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a5a40e672e7599d73ef8ef5758bbd7461">Alliance</a> { <a class="el" href="classsc2_1_1_unit.html#a5a40e672e7599d73ef8ef5758bbd7461af4dea1a00c973443e0d459bb522f7637">Self</a> = 1, 
<a class="el" href="classsc2_1_1_unit.html#a5a40e672e7599d73ef8ef5758bbd7461a2215843e5737efd34b268be16757ed27">Ally</a> = 2, 
<a class="el" href="classsc2_1_1_unit.html#a5a40e672e7599d73ef8ef5758bbd7461a50d778ca3f3c354474d27013b7eda3c1">Neutral</a> = 3, 
<a class="el" href="classsc2_1_1_unit.html#a5a40e672e7599d73ef8ef5758bbd7461a005610fbf80eaa3cc4ea28c26a42eae6">Enemy</a> = 4
 }<tr class="memdesc:a5a40e672e7599d73ef8ef5758bbd7461"><td class="mdescLeft">&#160;</td><td class="mdescRight">Relationship to this player.  <a href="classsc2_1_1_unit.html#a5a40e672e7599d73ef8ef5758bbd7461">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a5a40e672e7599d73ef8ef5758bbd7461"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03f99cfaa8ad4f9bba6cd0bc5586c943"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a03f99cfaa8ad4f9bba6cd0bc5586c943">CloakState</a> { <a class="el" href="classsc2_1_1_unit.html#a03f99cfaa8ad4f9bba6cd0bc5586c943ac0cfb31c1521ab9e7759bfa12bf05b23">Cloaked</a> = 1, 
<a class="el" href="classsc2_1_1_unit.html#a03f99cfaa8ad4f9bba6cd0bc5586c943a4d1351a1f8046904bf4b089813b610b0">CloakedDetected</a> = 2, 
<a class="el" href="classsc2_1_1_unit.html#a03f99cfaa8ad4f9bba6cd0bc5586c943a992a9de6738dc46b3ba64a6da9030f0f">NotCloaked</a> = 3, 
<a class="el" href="classsc2_1_1_unit.html#a03f99cfaa8ad4f9bba6cd0bc5586c943a2cf1dac1fc0a53735ae998f1cd437446">Unknown</a> = 4
 }<tr class="memdesc:a03f99cfaa8ad4f9bba6cd0bc5586c943"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classsc2_1_1_unit.html" title="A unit. Could be a structure, a worker or a military unit. ">Unit</a> cloak state.  <a href="classsc2_1_1_unit.html#a03f99cfaa8ad4f9bba6cd0bc5586c943">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a03f99cfaa8ad4f9bba6cd0bc5586c943"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a37330a1811b5fe37894d13d8b8f000ac"><td class="memItemLeft" align="right" valign="top"><a id="a37330a1811b5fe37894d13d8b8f000ac"></a>
<a class="el" href="classsc2_1_1_unit.html#af7815dad89107a05298c245b702ab270">DisplayType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a37330a1811b5fe37894d13d8b8f000ac">display_type</a></td></tr>
<tr class="memdesc:a37330a1811b5fe37894d13d8b8f000ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">If the unit is shown on screen or not. <br /></td></tr>
<tr class="separator:a37330a1811b5fe37894d13d8b8f000ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a639d0b3495e03ee28f5e91b16057d42b"><td class="memItemLeft" align="right" valign="top"><a id="a639d0b3495e03ee28f5e91b16057d42b"></a>
<a class="el" href="classsc2_1_1_unit.html#a5a40e672e7599d73ef8ef5758bbd7461">Alliance</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a639d0b3495e03ee28f5e91b16057d42b">alliance</a></td></tr>
<tr class="memdesc:a639d0b3495e03ee28f5e91b16057d42b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Relationship of the unit to this player. <br /></td></tr>
<tr class="separator:a639d0b3495e03ee28f5e91b16057d42b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1312ee20e783753ee8ddf054878f7d9f"><td class="memItemLeft" align="right" valign="top"><a id="a1312ee20e783753ee8ddf054878f7d9f"></a>
Tag&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a1312ee20e783753ee8ddf054878f7d9f">tag</a></td></tr>
<tr class="memdesc:a1312ee20e783753ee8ddf054878f7d9f"><td class="mdescLeft">&#160;</td><td class="mdescRight">A unique identifier for the instance of a unit. <br /></td></tr>
<tr class="separator:a1312ee20e783753ee8ddf054878f7d9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d7e26d2a7a33bc685fc3696dfed026f"><td class="memItemLeft" align="right" valign="top"><a id="a4d7e26d2a7a33bc685fc3696dfed026f"></a>
<a class="el" href="classsc2_1_1_s_c2_type.html">UnitTypeID</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a4d7e26d2a7a33bc685fc3696dfed026f">unit_type</a></td></tr>
<tr class="memdesc:a4d7e26d2a7a33bc685fc3696dfed026f"><td class="mdescLeft">&#160;</td><td class="mdescRight">An identifier of the type of unit. <br /></td></tr>
<tr class="separator:a4d7e26d2a7a33bc685fc3696dfed026f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29fec2e9dff50d8504e8a2b32f7a1af0"><td class="memItemLeft" align="right" valign="top"><a id="a29fec2e9dff50d8504e8a2b32f7a1af0"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a29fec2e9dff50d8504e8a2b32f7a1af0">owner</a></td></tr>
<tr class="memdesc:a29fec2e9dff50d8504e8a2b32f7a1af0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Which player owns a unit. <br /></td></tr>
<tr class="separator:a29fec2e9dff50d8504e8a2b32f7a1af0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adbe75d15c90712cb1e55e8b8bcbc1319"><td class="memItemLeft" align="right" valign="top"><a id="adbe75d15c90712cb1e55e8b8bcbc1319"></a>
<a class="el" href="structsc2_1_1_point3_d.html">Point3D</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#adbe75d15c90712cb1e55e8b8bcbc1319">pos</a></td></tr>
<tr class="memdesc:adbe75d15c90712cb1e55e8b8bcbc1319"><td class="mdescLeft">&#160;</td><td class="mdescRight">Position of the unit in the world. <br /></td></tr>
<tr class="separator:adbe75d15c90712cb1e55e8b8bcbc1319"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f947f6dffd571c2ab89ddd53609a7f4"><td class="memItemLeft" align="right" valign="top"><a id="a9f947f6dffd571c2ab89ddd53609a7f4"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a9f947f6dffd571c2ab89ddd53609a7f4">facing</a></td></tr>
<tr class="memdesc:a9f947f6dffd571c2ab89ddd53609a7f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Direction the unit faces in radians (1 radian == 57.296 degrees) <br /></td></tr>
<tr class="separator:a9f947f6dffd571c2ab89ddd53609a7f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c2d1fb9e6f150333d96cc8ce8f9e9bf"><td class="memItemLeft" align="right" valign="top"><a id="a0c2d1fb9e6f150333d96cc8ce8f9e9bf"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a0c2d1fb9e6f150333d96cc8ce8f9e9bf">radius</a></td></tr>
<tr class="memdesc:a0c2d1fb9e6f150333d96cc8ce8f9e9bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Radius of the unit. <br /></td></tr>
<tr class="separator:a0c2d1fb9e6f150333d96cc8ce8f9e9bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb3c46774c4d5dab4d641a4abcf68aba"><td class="memItemLeft" align="right" valign="top"><a id="abb3c46774c4d5dab4d641a4abcf68aba"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#abb3c46774c4d5dab4d641a4abcf68aba">build_progress</a></td></tr>
<tr class="memdesc:abb3c46774c4d5dab4d641a4abcf68aba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gives progress under construction. Range: [0.0, 1.0]. 1.0 == finished. <br /></td></tr>
<tr class="separator:abb3c46774c4d5dab4d641a4abcf68aba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad06992e99ddf45f28be06550c61fabd4"><td class="memItemLeft" align="right" valign="top"><a id="ad06992e99ddf45f28be06550c61fabd4"></a>
<a class="el" href="classsc2_1_1_unit.html#a03f99cfaa8ad4f9bba6cd0bc5586c943">CloakState</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#ad06992e99ddf45f28be06550c61fabd4">cloak</a></td></tr>
<tr class="memdesc:ad06992e99ddf45f28be06550c61fabd4"><td class="mdescLeft">&#160;</td><td class="mdescRight">If the unit is cloaked. <br /></td></tr>
<tr class="separator:ad06992e99ddf45f28be06550c61fabd4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a212a848d56f8ce323c1a8b5ac7bd0221"><td class="memItemLeft" align="right" valign="top"><a id="a212a848d56f8ce323c1a8b5ac7bd0221"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a212a848d56f8ce323c1a8b5ac7bd0221">detect_range</a></td></tr>
<tr class="memdesc:a212a848d56f8ce323c1a8b5ac7bd0221"><td class="mdescLeft">&#160;</td><td class="mdescRight">Range of detector for detector units. <br /></td></tr>
<tr class="separator:a212a848d56f8ce323c1a8b5ac7bd0221"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22e99532761f81474b7e666e08bf8727"><td class="memItemLeft" align="right" valign="top"><a id="a22e99532761f81474b7e666e08bf8727"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a22e99532761f81474b7e666e08bf8727">radar_range</a></td></tr>
<tr class="memdesc:a22e99532761f81474b7e666e08bf8727"><td class="mdescLeft">&#160;</td><td class="mdescRight">Range of radar for units that are radar units. <br /></td></tr>
<tr class="separator:a22e99532761f81474b7e666e08bf8727"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc532e894e9496c843ac00abce343f41"><td class="memItemLeft" align="right" valign="top"><a id="afc532e894e9496c843ac00abce343f41"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#afc532e894e9496c843ac00abce343f41">is_selected</a></td></tr>
<tr class="memdesc:afc532e894e9496c843ac00abce343f41"><td class="mdescLeft">&#160;</td><td class="mdescRight">If the unit is in the current selection of the player. <br /></td></tr>
<tr class="separator:afc532e894e9496c843ac00abce343f41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2766e02109100817ffd5135591746293"><td class="memItemLeft" align="right" valign="top"><a id="a2766e02109100817ffd5135591746293"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a2766e02109100817ffd5135591746293">is_on_screen</a></td></tr>
<tr class="memdesc:a2766e02109100817ffd5135591746293"><td class="mdescLeft">&#160;</td><td class="mdescRight">Visible and within the camera frustum. <br /></td></tr>
<tr class="separator:a2766e02109100817ffd5135591746293"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa730ea2bf474d4422e6c6a1e267945d4"><td class="memItemLeft" align="right" valign="top"><a id="aa730ea2bf474d4422e6c6a1e267945d4"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#aa730ea2bf474d4422e6c6a1e267945d4">is_blip</a></td></tr>
<tr class="memdesc:aa730ea2bf474d4422e6c6a1e267945d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Detected by sensor tower. <br /></td></tr>
<tr class="separator:aa730ea2bf474d4422e6c6a1e267945d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7049529d7ec06419b85121a384949abf"><td class="memItemLeft" align="right" valign="top"><a id="a7049529d7ec06419b85121a384949abf"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a7049529d7ec06419b85121a384949abf">health</a></td></tr>
<tr class="memdesc:a7049529d7ec06419b85121a384949abf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Health of the unit. Not set for snapshots. <br /></td></tr>
<tr class="separator:a7049529d7ec06419b85121a384949abf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9903ceca120d82cacc49dee00150fe67"><td class="memItemLeft" align="right" valign="top"><a id="a9903ceca120d82cacc49dee00150fe67"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a9903ceca120d82cacc49dee00150fe67">health_max</a></td></tr>
<tr class="memdesc:a9903ceca120d82cacc49dee00150fe67"><td class="mdescLeft">&#160;</td><td class="mdescRight">Max health for the unit. Not set for snapshots. <br /></td></tr>
<tr class="separator:a9903ceca120d82cacc49dee00150fe67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5ee0c4d31a1266e31ac0a739bcc3d86"><td class="memItemLeft" align="right" valign="top"><a id="ae5ee0c4d31a1266e31ac0a739bcc3d86"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#ae5ee0c4d31a1266e31ac0a739bcc3d86">shield</a></td></tr>
<tr class="memdesc:ae5ee0c4d31a1266e31ac0a739bcc3d86"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shield of the unit. Not set for snapshots. <br /></td></tr>
<tr class="separator:ae5ee0c4d31a1266e31ac0a739bcc3d86"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf79ea67a982c7d858abb0190cc0ac5c"><td class="memItemLeft" align="right" valign="top"><a id="aaf79ea67a982c7d858abb0190cc0ac5c"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#aaf79ea67a982c7d858abb0190cc0ac5c">shield_max</a></td></tr>
<tr class="memdesc:aaf79ea67a982c7d858abb0190cc0ac5c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Max shield of the unit. Not set for snapshots. <br /></td></tr>
<tr class="separator:aaf79ea67a982c7d858abb0190cc0ac5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa2b194b8a5499b7591356dc6365c0cdc"><td class="memItemLeft" align="right" valign="top"><a id="aa2b194b8a5499b7591356dc6365c0cdc"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#aa2b194b8a5499b7591356dc6365c0cdc">energy</a></td></tr>
<tr class="memdesc:aa2b194b8a5499b7591356dc6365c0cdc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Energy of the unit. Not set for snapshots. <br /></td></tr>
<tr class="separator:aa2b194b8a5499b7591356dc6365c0cdc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a746011af49f363075e4c595c384933ff"><td class="memItemLeft" align="right" valign="top"><a id="a746011af49f363075e4c595c384933ff"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a746011af49f363075e4c595c384933ff">energy_max</a></td></tr>
<tr class="memdesc:a746011af49f363075e4c595c384933ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Max energy of the unit. Not set for snapshots. <br /></td></tr>
<tr class="separator:a746011af49f363075e4c595c384933ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a689d7b7c9a68b3cd172f2333203423b9"><td class="memItemLeft" align="right" valign="top"><a id="a689d7b7c9a68b3cd172f2333203423b9"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a689d7b7c9a68b3cd172f2333203423b9">mineral_contents</a></td></tr>
<tr class="memdesc:a689d7b7c9a68b3cd172f2333203423b9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Amount of minerals if the unit is a mineral field. Not set for snapshots. <br /></td></tr>
<tr class="separator:a689d7b7c9a68b3cd172f2333203423b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76fcaa010a8a61b14b2839f49ef0f257"><td class="memItemLeft" align="right" valign="top"><a id="a76fcaa010a8a61b14b2839f49ef0f257"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a76fcaa010a8a61b14b2839f49ef0f257">vespene_contents</a></td></tr>
<tr class="memdesc:a76fcaa010a8a61b14b2839f49ef0f257"><td class="mdescLeft">&#160;</td><td class="mdescRight">Amount of vespene if the unit is a geyser. Not set for snapshots. <br /></td></tr>
<tr class="separator:a76fcaa010a8a61b14b2839f49ef0f257"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6480f0b177f99a656ab3a273df3f8c3c"><td class="memItemLeft" align="right" valign="top"><a id="a6480f0b177f99a656ab3a273df3f8c3c"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a6480f0b177f99a656ab3a273df3f8c3c">is_flying</a></td></tr>
<tr class="memdesc:a6480f0b177f99a656ab3a273df3f8c3c"><td class="mdescLeft">&#160;</td><td class="mdescRight">If the unit is flying. Not set for snapshots. <br /></td></tr>
<tr class="separator:a6480f0b177f99a656ab3a273df3f8c3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af815cd5269616209d4a2bdf2e734decb"><td class="memItemLeft" align="right" valign="top"><a id="af815cd5269616209d4a2bdf2e734decb"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#af815cd5269616209d4a2bdf2e734decb">is_burrowed</a></td></tr>
<tr class="memdesc:af815cd5269616209d4a2bdf2e734decb"><td class="mdescLeft">&#160;</td><td class="mdescRight">If the unit is burrowed. Not set for snapshots. <br /></td></tr>
<tr class="separator:af815cd5269616209d4a2bdf2e734decb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09bcc532a373b225b4ddb16fa77e9c41"><td class="memItemLeft" align="right" valign="top"><a id="a09bcc532a373b225b4ddb16fa77e9c41"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a09bcc532a373b225b4ddb16fa77e9c41">weapon_cooldown</a></td></tr>
<tr class="memdesc:a09bcc532a373b225b4ddb16fa77e9c41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Time remaining for a weapon on cooldown. Not set for snapshots. <br /></td></tr>
<tr class="separator:a09bcc532a373b225b4ddb16fa77e9c41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45b97cf510454a385c372e512b40c51a"><td class="memItemLeft" align="right" valign="top"><a id="a45b97cf510454a385c372e512b40c51a"></a>
std::vector&lt; <a class="el" href="structsc2_1_1_unit_order.html">UnitOrder</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a45b97cf510454a385c372e512b40c51a">orders</a></td></tr>
<tr class="memdesc:a45b97cf510454a385c372e512b40c51a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Orders on a unit. Only valid for this player's units. <br /></td></tr>
<tr class="separator:a45b97cf510454a385c372e512b40c51a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01b13cf74f1851983a834fdbf3e22b8a"><td class="memItemLeft" align="right" valign="top"><a id="a01b13cf74f1851983a834fdbf3e22b8a"></a>
Tag&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a01b13cf74f1851983a834fdbf3e22b8a">add_on_tag</a></td></tr>
<tr class="memdesc:a01b13cf74f1851983a834fdbf3e22b8a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add-on like a tech lab or reactor. Only valid for this player's units. <br /></td></tr>
<tr class="separator:a01b13cf74f1851983a834fdbf3e22b8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01e2249c0d1bd27d8b61f233fbd75b66"><td class="memItemLeft" align="right" valign="top"><a id="a01e2249c0d1bd27d8b61f233fbd75b66"></a>
std::vector&lt; <a class="el" href="structsc2_1_1_passenger_unit.html">PassengerUnit</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a01e2249c0d1bd27d8b61f233fbd75b66">passengers</a></td></tr>
<tr class="memdesc:a01e2249c0d1bd27d8b61f233fbd75b66"><td class="mdescLeft">&#160;</td><td class="mdescRight">Passengers in this transport. Only valid for this player's units. <br /></td></tr>
<tr class="separator:a01e2249c0d1bd27d8b61f233fbd75b66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59fb99084581bf4871a7de173931fc79"><td class="memItemLeft" align="right" valign="top"><a id="a59fb99084581bf4871a7de173931fc79"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a59fb99084581bf4871a7de173931fc79">cargo_space_taken</a></td></tr>
<tr class="memdesc:a59fb99084581bf4871a7de173931fc79"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of cargo slots used in the transport. Only valid for this player's units. <br /></td></tr>
<tr class="separator:a59fb99084581bf4871a7de173931fc79"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5dfd5b0c6f27a8a1f89b372260d9fb2"><td class="memItemLeft" align="right" valign="top"><a id="ab5dfd5b0c6f27a8a1f89b372260d9fb2"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#ab5dfd5b0c6f27a8a1f89b372260d9fb2">cargo_space_max</a></td></tr>
<tr class="memdesc:ab5dfd5b0c6f27a8a1f89b372260d9fb2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of cargo slots available for a transport. Only valid for this player's units. <br /></td></tr>
<tr class="separator:ab5dfd5b0c6f27a8a1f89b372260d9fb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca42babe7fa2542782783a825fb99522"><td class="memItemLeft" align="right" valign="top"><a id="aca42babe7fa2542782783a825fb99522"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#aca42babe7fa2542782783a825fb99522">assigned_harvesters</a></td></tr>
<tr class="memdesc:aca42babe7fa2542782783a825fb99522"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of harvesters associated with a town hall (e.g., Command Center). Only valid for this player's units. <br /></td></tr>
<tr class="separator:aca42babe7fa2542782783a825fb99522"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59c9e7c9c14f50f11d33b58716f664fe"><td class="memItemLeft" align="right" valign="top"><a id="a59c9e7c9c14f50f11d33b58716f664fe"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a59c9e7c9c14f50f11d33b58716f664fe">ideal_harvesters</a></td></tr>
<tr class="memdesc:a59c9e7c9c14f50f11d33b58716f664fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of harvesters that can be assigned to a town hall (e.g., Command Center). Only valid for this player's units. <br /></td></tr>
<tr class="separator:a59c9e7c9c14f50f11d33b58716f664fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d1cc770a037ed2458bf944a787dcca5"><td class="memItemLeft" align="right" valign="top"><a id="a0d1cc770a037ed2458bf944a787dcca5"></a>
Tag&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a0d1cc770a037ed2458bf944a787dcca5">engaged_target_tag</a></td></tr>
<tr class="memdesc:a0d1cc770a037ed2458bf944a787dcca5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Target unit of a unit. Only valid for this player's units. <br /></td></tr>
<tr class="separator:a0d1cc770a037ed2458bf944a787dcca5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34f17705c61114ad78c192ed7b06a9af"><td class="memItemLeft" align="right" valign="top"><a id="a34f17705c61114ad78c192ed7b06a9af"></a>
std::vector&lt; <a class="el" href="classsc2_1_1_s_c2_type.html">BuffID</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a34f17705c61114ad78c192ed7b06a9af">buffs</a></td></tr>
<tr class="memdesc:a34f17705c61114ad78c192ed7b06a9af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Buffs on this unit. Only valid for this player's units. <br /></td></tr>
<tr class="separator:a34f17705c61114ad78c192ed7b06a9af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13e408736f731902adb60d2725507dc9"><td class="memItemLeft" align="right" valign="top"><a id="a13e408736f731902adb60d2725507dc9"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a13e408736f731902adb60d2725507dc9">is_powered</a></td></tr>
<tr class="memdesc:a13e408736f731902adb60d2725507dc9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Whether the unit is powered by a pylon. <br /></td></tr>
<tr class="separator:a13e408736f731902adb60d2725507dc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c39436632bf6f82f1a47df3eedbed5d"><td class="memItemLeft" align="right" valign="top"><a id="a5c39436632bf6f82f1a47df3eedbed5d"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#a5c39436632bf6f82f1a47df3eedbed5d">is_alive</a></td></tr>
<tr class="memdesc:a5c39436632bf6f82f1a47df3eedbed5d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Whether the unit is alive or not. <br /></td></tr>
<tr class="separator:a5c39436632bf6f82f1a47df3eedbed5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af49caa7da174260e424ab4d0c5ae6c78"><td class="memItemLeft" align="right" valign="top"><a id="af49caa7da174260e424ab4d0c5ae6c78"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsc2_1_1_unit.html#af49caa7da174260e424ab4d0c5ae6c78">last_seen_game_loop</a></td></tr>
<tr class="memdesc:af49caa7da174260e424ab4d0c5ae6c78"><td class="mdescLeft">&#160;</td><td class="mdescRight">The last time the unit was seen. <br /></td></tr>
<tr class="separator:af49caa7da174260e424ab4d0c5ae6c78"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A unit. Could be a structure, a worker or a military unit. </p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="a5a40e672e7599d73ef8ef5758bbd7461"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5a40e672e7599d73ef8ef5758bbd7461">&#9670;&nbsp;</a></span>Alliance</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classsc2_1_1_unit.html#a5a40e672e7599d73ef8ef5758bbd7461">sc2::Unit::Alliance</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Relationship to this player. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a5a40e672e7599d73ef8ef5758bbd7461af4dea1a00c973443e0d459bb522f7637"></a>Self&#160;</td><td class="fielddoc"><p>Belongs to the player. </p>
</td></tr>
<tr><td class="fieldname"><a id="a5a40e672e7599d73ef8ef5758bbd7461a2215843e5737efd34b268be16757ed27"></a>Ally&#160;</td><td class="fielddoc"><p>Ally of the player. </p>
</td></tr>
<tr><td class="fieldname"><a id="a5a40e672e7599d73ef8ef5758bbd7461a50d778ca3f3c354474d27013b7eda3c1"></a>Neutral&#160;</td><td class="fielddoc"><p>A neutral unit, usually a non-player unit like a mineral field. </p>
</td></tr>
<tr><td class="fieldname"><a id="a5a40e672e7599d73ef8ef5758bbd7461a005610fbf80eaa3cc4ea28c26a42eae6"></a>Enemy&#160;</td><td class="fielddoc"><p>Enemy of the player. </p>
</td></tr>
</table>

</div>
</div>
<a id="a03f99cfaa8ad4f9bba6cd0bc5586c943"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a03f99cfaa8ad4f9bba6cd0bc5586c943">&#9670;&nbsp;</a></span>CloakState</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classsc2_1_1_unit.html#a03f99cfaa8ad4f9bba6cd0bc5586c943">sc2::Unit::CloakState</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><a class="el" href="classsc2_1_1_unit.html" title="A unit. Could be a structure, a worker or a military unit. ">Unit</a> cloak state. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a03f99cfaa8ad4f9bba6cd0bc5586c943ac0cfb31c1521ab9e7759bfa12bf05b23"></a>Cloaked&#160;</td><td class="fielddoc"><p>Cloaked, invisible to enemies until detected. </p>
</td></tr>
<tr><td class="fieldname"><a id="a03f99cfaa8ad4f9bba6cd0bc5586c943a4d1351a1f8046904bf4b089813b610b0"></a>CloakedDetected&#160;</td><td class="fielddoc"><p>Cloaked enemy, but detected. </p>
</td></tr>
<tr><td class="fieldname"><a id="a03f99cfaa8ad4f9bba6cd0bc5586c943a992a9de6738dc46b3ba64a6da9030f0f"></a>NotCloaked&#160;</td><td class="fielddoc"><p>No cloaking. </p>
</td></tr>
<tr><td class="fieldname"><a id="a03f99cfaa8ad4f9bba6cd0bc5586c943a2cf1dac1fc0a53735ae998f1cd437446"></a>Unknown&#160;</td><td class="fielddoc"><p>Could not determine cloaking state. </p>
</td></tr>
</table>

</div>
</div>
<a id="af7815dad89107a05298c245b702ab270"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af7815dad89107a05298c245b702ab270">&#9670;&nbsp;</a></span>DisplayType</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classsc2_1_1_unit.html#af7815dad89107a05298c245b702ab270">sc2::Unit::DisplayType</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>If the unit is shown on screen or not. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="af7815dad89107a05298c245b702ab270abd326f19234975ca23bb3265223d969d"></a>Visible&#160;</td><td class="fielddoc"><p><a class="el" href="classsc2_1_1_unit.html" title="A unit. Could be a structure, a worker or a military unit. ">Unit</a> will be visible. </p>
</td></tr>
<tr><td class="fieldname"><a id="af7815dad89107a05298c245b702ab270a0e970750301873d6ee4903e9bcb8d2c6"></a>Snapshot&#160;</td><td class="fielddoc"><p><a class="el" href="classsc2_1_1_unit.html" title="A unit. Could be a structure, a worker or a military unit. ">Unit</a> is represented by a snapshot in the fog-of-war. This is for units that don't belong to the player. The actual unit may be in a different location or state. </p>
</td></tr>
<tr><td class="fieldname"><a id="af7815dad89107a05298c245b702ab270a688e1743ab48c61d2e77ac6212f77cd9"></a>Hidden&#160;</td><td class="fielddoc"><p><a class="el" href="classsc2_1_1_unit.html" title="A unit. Could be a structure, a worker or a military unit. ">Unit</a> will be hidden to enemies. </p>
</td></tr>
</table>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/sc2api/<a class="el" href="sc2__unit_8h_source.html">sc2_unit.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
